const remUnit = 100
const widthUnit = 375

function setRem () {
  const width = window.innerWidth
  const scale = width / widthUnit
  const newFontSize = remUnit * scale
  document.querySelector('html').style.fontSize = `${newFontSize}px`
}

setRem()

window.addEventListener('resize', () => {
  setRem()
})
